# 练习2：输入两个正整数，计算它们的最大公约数和最小公倍数。 

if __name__ == '__main__':
    while True:
        input_data = input('输入两个正整数：')
        input1, input2 = input_data.split(' ')
        num1 = int(input1)
        num2 = int(input2)
        if num1 > num2:
            count_num = num2
        else:
            count_num = num1
        while count_num > 0:
             if num1 % count_num == 0 and num2 % count_num == 0:
                print(f'最大公约数{count_num}')
                print(f'最大公倍数{num1 * num2 // count_num}')
                break
